In network computing, a distributed computer environment is a software technology for establishing and managing computing and data exchange under a client/server model in a system of distributed computers. A distributed computer environment is typically used in a larger network of computer systems having servers placed at different geographic locations. With the distributed computer environment, application users can access applications and data at remote servers.
In a distributed computer environment, it is often desirable to replicate an application to a number of different servers so that the application can run at several locations simultaneously. Application replication enables the distributed computer environment to support more users because the distributed computer environment has more computers available to perform the application operations. Application replication also distributes the application in the distributed computer environment so that users may interact with a copy of the application that is close by in network terms. This reduces delay and bandwidth consumption in the distributed computer environment.
Typically, when a user, through a client device, interacts with an application such as a web store for Internet shopping, the application maintains a “session state” about the user interaction. In the session state, the application records the events of the session as well as the client device identification. When the user, through the client device, next accesses the application, this next access is interpreted within the context of the saved information about the previous interactions. For example, the user may have already added items to a shopping cart. Each time the user interacts with the application, e.g. to add another item to the shopping cart, the request is interpreted relative to the shopping cart associated with that user through the client device.
When there are many copies of the application, each copy of the application has its own session state concerning the client devices that have interacted with that copy recently. If a client device accessed a first copy of the application, and then, in the next interaction, the client device accesses a second copy, the session state is effectively lost because the second copy of the application does not have any information about the session state established at the first copy of the application. For example, the second copy does not know what shopping cart was associated with the client device. It is therefore desirable for every user interaction within a session to be handled by the same copy of the application.
The code running on a client device typically locates an application in a distributed computer environment via the domain naming service (DNS). DNS is an Internet protocol and a distributed database that maps domain names, also referred to as DNS names, to IP addresses. When the client device code opens a session with the application, the client device code refers to the application via the application's DNS name. The DNS system, running in a network with the distributed computer environment, causes the DNS name to be resolved by a routing node that maps the DNS name to an IP address of a node running a copy of the application. A routing node in the DNS system, that is, a node running DNS resolution code, creates a binding between the DNS name and the IP address which the routing node stores in a database of bindings. Then the client device interacts with the application using this IP address.
Locating the application via DNS enables the distributed computer environment to support multiple copies of the application. One DNS name is generally shared by all copies of the application. The client device code, because it specifies an application by the DNS name, does not assume a particular network location for the application. The routing node, in this configuration, can then select any one application from among the many application copies, and return the IP address of the selected copy to the user.